package com.ogilvy.audi.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ogilvy.audi.bean.Acmnt;
import com.ogilvy.audi.service.AcmntService;
import com.ogilvy.frame.action.BaseAction;

@SuppressWarnings("serial")
@Scope("prototype")
@Controller("auti.action.AcmntAction")
public class AcmntAction extends BaseAction {
	@Autowired
	protected AcmntService acmntService;
	String acmntId;

	public String query() {
		return "result";
	}

	public String add() {
		Acmnt acmnt = new Acmnt();
		acmntService.add(acmnt);
		return null;
	}

	public String modify() {
		return null;
	}

	public String del() {
		acmntService.del(Integer.parseInt(acmntId));
		return null;
	}
}
